<%@ page pageEncoding="UTF-8"%>
<%@ page import="com.hwhp.entity.*"%>
<%@ page import="java.util.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
List<SGhRecord> list=(List<SGhRecord> )request.getAttribute("recordList");
String id=(String)request.getAttribute("id");
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
	<HEAD>
		<LINK href="<%=basePath%>css/milkwhite.css" type=TEXT/CSS
			rel=StyleSheet></LINK>
		<LINK href="<%=basePath%>css/htmilkwhite.css" type=TEXT/CSS
			rel=StyleSheet></LINK>
		<LINK href="<%=basePath%>css/dhtmlxgrid.css" type=TEXT/CSS
			rel=StyleSheet></LINK>
		<SCRIPT src="<%=basePath%>js/list/dhtmlxcommon.js"
			type=text/javascript></SCRIPT>
		<SCRIPT src="<%=basePath%>js/list/dhtmlxgrid.js" type=text/javascript></SCRIPT>
		<SCRIPT src="<%=basePath%>js/list/dhtmlxgridcell.js"
			type=text/javascript></SCRIPT>
		<SCRIPT src="<%=basePath%>js/list/dhtmlxgrid_start.js"
			type=text/javascript></SCRIPT>
	</HEAD>
	<BODY style="MARGIN: 0px; OVERFLOW: visible">
		<FORM id="formlist" name="formlist" action="" method="post">
			<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0
											align="center">
											<TBODY>
												<TR>
													<TD class=linelabel3 vAlign=bottom
														background=<%=basePath%>images/commom/00_r5_c30.jpg>
														挂号管理>>门诊挂号
													</TD>
												</TR>
											</TBODY>
										</TABLE>
			<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%"
				border=0>
				<TBODY>
					
					<TR>
						<TD class=middlelinel></TD>
						<TD height=20>
							<!-- 搜索 -->
							<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%">
								<TBODY>
									<TR>
										<TD style="WIDTH: 70px" align=right>
											病历号:
										</TD>
										<TD style="WIDTH: 80px" align=left>
											<INPUT id="num" name="num">&nbsp;&nbsp;
										</TD>
										<TD style="WIDTH: 80px"><img src="<%=basePath%>images/gh/but_chaxun.gif" style="cursor: hand" onclick="queryByNum()"></TD>
										<TD style="WIDTH: 5px">  
										</TD>
										<TD style="WIDTH: 80px"><img src="<%=basePath%>images/gh/xinjian.jpg" style="cursor: hand" onclick="preRecordAdd()"></TD>
										<TD>
											
										</TD>
										<TD vAlign=top align="right">
											<table border='0' cellpadding='2' cellspacing='0'>
												<tr height="20">
													<td></td>
														<td>
														</td>
													<td>
														</td>
													<td></td>
													<td>
														
													</td>
													<td></td>
														<td></td>
														<td>
														
													</td>
													<td>
														</td>
												</tr>
											</table>
										</TD>
									</TR>
								</TBODY>
							</TABLE>
						</TD>
						<TD class=middleliner></TD>
					</TR>
					<TR>
						<TD class=middlelinel></TD>
						<TD
							style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"
							vAlign=top>
							<TABLE class=dhtmlxGrid id=gridbox height="100%" width="100%">
								<TBODY>
									<TR>
									    <TD noWrap type="ro" style="width:30">
									       <INPUT class=input3 id=alldepartid name=departid value="" type="checkbox">
										</TD>
										<TD noWrap type="ro" style="width:50">
									         序号
										</TD>
										<TD noWrap type="ro">
											病历号
										</TD>
										<TD noWrap type="ro">
											姓名
										</TD>
										<TD noWrap type="ro">
											科室
										</TD>
										<TD noWrap type="ro">
											号类
										</TD>
										<TD noWrap type="ro">
											医生
										</TD>
										<TD noWrap type="ro">
											挂号日期
										</TD>
										<TD noWrap type="ro" style="width:80">
											操作
										</TD>
									</TR>
									<%
									 if(list!=null&&list.size()>0){
									  int i=1;
									  for(SGhRecord recordObj:list){
									 %>
									<TR>
									    <TD noWrap>
									       <INPUT class=input3 id=id name=id value="" type="checkbox">
										</TD>
									    <TD noWrap align="center">
									       <%=i%>
										</TD>
										<TD noWrap>
										    <%="".equals(recordObj.getNum())?"&nbsp":recordObj.getNum() %>
										</TD>
										<TD noWrap>
											<%="".equals(recordObj.getName())?"&nbsp":recordObj.getName() %>
										</TD>
										<TD noWrap>
											<%="".equals(recordObj.getDepartment())?"&nbsp":recordObj.getDepartment() %>
										</TD>
										<TD noWrap>
											<%="".equals(recordObj.getType())?"&nbsp":recordObj.getType() %>
										</TD>
										<TD noWrap>
											<%="".equals(recordObj.getDoctor())?"&nbsp":recordObj.getDoctor() %>
										</TD>
										<TD noWrap>
											<%="".equals(recordObj.getGhDate())?"&nbsp":recordObj.getGhDate() %>
										</TD>
										<TD noWrap align="center">
											<img src="<%=basePath%>images/button/edit.gif" style="cursor: hand" onclick="editProcess('<%=recordObj.getId() %>')">&nbsp;&nbsp;
											<img src="<%=basePath%>images/button/del.gif" title="删除" style="cursor: hand" onclick="deleteProcess('<%=recordObj.getId() %>')">
										</TD>
									</TR>
									<%
									 i++;
									 }
									 }else{
									 %>
									 
									 <%
									 }
									  %>
								</TBODY>
							</TABLE>
						</TD>
					<TD class=middleliner></TD>
					</TR>
					<TR>
						<TD class=middlebottoml></TD>
						<TD class=middlebottomm></TD>
						<TD class=middlebottomr></TD>
					</TR>
				</TBODY>
			</TABLE>
		</FORM>
	</BODY>
	<SCRIPT type=text/javascript>
		function editProcess(id){
		  formlist.action="/chis/gh/record!preUpdate.action?id="+id;
		  formlist.submit();
		}
		
		function deleteProcess(id){
		  formlist.action="/chis/gh/record!delete.action?id="+id;
		  formlist.submit();
		}
		
		function queryByNum(){
		  var num = document.getElementById("num").value;
		  formlist.action="/chis/gh/record!queryByNum.action?num="+num;
		  formlist.submit();
		}
		
		function preRecordAdd(){
		formlist.action="/chis/gh/record!preRecordAdd.action";
		  formlist.submit();
		}
	</SCRIPT>
</HTML>
